<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
  ul{
    display: flex;
  }

    li {
      width: 40px;
      margin-right: 40px;
    }
    .active{
      border: 2px solid red;
    }
  </style>
</head>

<body>
  <div class="app">
    <!-- <h1 :class="a">我是h</h1> -->
    <button @click="index--" v-show="index>0">上一张</button>
    <button @click="index++" v-show="index<url.length-1">下一张</button>
    <ul>
    <li :class="index==i?'active':''" v-for="(item,i) in url" @click="tu(i,item,$event)" >
      <img :src="item" alt="" style="width: 40px;">
    </li>
    </ul>
    <img :src="url[index]" alt="">
  </div>


  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <script>
    const app = new Vue({
      el: '.app',
      data: {
        url: [
          './imgs/10-01.png',
          './imgs/10-02.png',
          './imgs/11-00.gif',
          './imgs/11-01.gif',
          './imgs/11-02.gif',
          './imgs/11-03.gif',
          './imgs/11-04.png',
          './imgs/11-05.png',
        ],
        img:'',
        index:0
      },
      methods: {
        tu(i,item,e) {
          console.log(item,i);
          this.img = item
          this.index = i
          console.log(e);
        }
      }
    })
  </script>
</body>

</html>